package com.multiple.datasource.controller.back;

import com.multiple.datasource.service.back.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value = "/role")
public class RoleController {
    @Autowired
    RoleService roleService;

    @ResponseBody
    @RequestMapping(value="/detail")
    public Object roleDetail(@RequestParam int id){
        return roleService.getRoleById(id);
    }
}
